import request from "@/utils/requestBase";

/**
 * @description 举报投诉图表统计
 */
export function complaintStat(data: any) {
  return request.get({
    url: "/complaint/manageStatistics",
    data,
  });
}

/**
 * @description 举报投诉详情列表数据
 */
export function listComplaint(data: any) {
  return request.get({
    url: "/complaint/listPagePolice",
    data,
  });
}

/**
 * @description 举报投诉总数统计
 */
export function complaintStatCount(data: any) {
  return request.get({
    url: "/complaint/manageStatisticsCount",
    data,
  });
}

/**
 * @description 更新投诉有效状态
 */
export function updateComplaintStatus(data: any) {
  return request.put({
    url: "/complaint/updateEffectiveStatus",
    data,
  });
}

/**
 * @description 民警-投诉统计
 */
export function complaintStatOfPolice() {
  return request.get({
    url: "/complaint/policeStatistics",
  });
}

/**
 * @description 新增举报投诉
 */
export function addComplaint(data: any) {
  return request.post({
    url: "/complaint/add",
    data,
  });
}

/**
 * @description 历史举报投诉列表
 */
export function listComplaintHis(data: any) {
  return request.get({
    url: "/complaint/listPage",
    data,
  });
}

/**
 * @description 删除举报投诉
 */
export function delComplaint(ids: any) {
  return request.del({
    url: `/complaint/delete/${ids}`,
  });
}
